package com.bysj.controller;

import com.bysj.entity.Admin;
import com.bysj.service.AdminService;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("admin")
public class AdminController {
    @Autowired
    AdminService adminService;
    //登录
    @RequestMapping("Login")
    @CrossOrigin
    public List<Admin> Login(@Param("name") String name,@Param("password") String password){
        return adminService.login(name,password);
    }
}
